<template>
  <div class="page">
    <button class="btn-back" type="button" @click="goHome">
    <strong>返回</strong>
    <div id="container-stars">
      <div id="stars"></div>
    </div>

    <div id="glow">
      <div class="circle"></div>
      <div class="circle"></div>
    </div>
  </button>


  <h1 class="title">友情链接</h1>
  <ul class="links-list">
    <li class="item"><a href="https://herrylo.github.io/" target="_blank">Herrylo`s Blog </a></li>
  </ul>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';

const router = useRouter()
const goHome = () => {
  router.go(-1)
}
</script>

<style lang="scss" scoped>
.page{
  padding-bottom: 20vh;
}
.title{
  margin: 60px 0 30px 0;
  font-size: 32px;
  font-weight: 100;
  text-align: center;
  color: #000;
}
.links-list{
    margin: 30px auto 60px auto;
    padding: 0;
    line-height: 0;
    list-style: none;
    text-align: center;
    .item{
      display: inline-block;
      position: relative;
      margin: 0 8px 16px 8px;
      width: 180px;
      height: 74px;
      background-color: #fff;
      box-shadow: inset 0 0 0 1px #f1f1f1;
      border: 1px solid #333;
      overflow: hidden;
      box-sizing: border-box;
      list-style: none;
      text-align: center;
      line-height: 74px;
      &:hover{
        box-shadow: inset 0 0 0 2px #45b4ff;
        // background: url(https://herrylo.github.io/image/logo.jpg);
        // background-size: cover;
      }
      a {
          text-decoration: none;
          cursor: pointer;
          // color: #909090;
          color: #333;
        }
    }
}


.btn-back {
  position: fixed;
  bottom: 10vh;
  left: 50%;
  transform: translateX(-50%);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 13rem;
  height: 3rem;
  background-size: 300% 300%;
  backdrop-filter: blur(1rem);
  border-radius: 5rem;
  transition: 0.5s;
  animation: gradient_301 5s ease infinite;
  border: double 4px transparent;
  background-image: linear-gradient(#212121, #212121),  linear-gradient(137.48deg, #ffdb3b 10%,#FE53BB 45%, #8F51EA 67%, #0044ff 87%);
  background-origin: border-box;
  background-clip: content-box, border-box;
}

#container-stars {
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: 0.5s;
  backdrop-filter: blur(1rem);
  border-radius: 5rem;
}

strong {
  z-index: 2;
  font-family: 'Avalors Personal Use';
  font-size: 12px;
  letter-spacing: 5px;
  color: #FFFFFF;
  text-shadow: 0 0 4px white;
}

#glow {
  position: absolute;
  display: flex;
  width: 12rem;
}

.circle {
  width: 100%;
  height: 30px;
  filter: blur(2rem);
  animation: pulse_3011 4s infinite;
  z-index: -1;
}

.circle:nth-of-type(1) {
  background: rgba(254, 83, 186, 0.636);
}

.circle:nth-of-type(2) {
  background: rgba(142, 81, 234, 0.704);
}

.btn-back:hover #container-stars {
  z-index: 1;
  background-color: #212121;
}

.btn-back:hover {
  transform: translateX(-50%) scale(1.1)
}

.btn-back:active {
  border: double 4px #FE53BB;
  background-origin: border-box;
  background-clip: content-box, border-box;
  animation: none;
}

.btn-back:active .circle {
  background: #FE53BB;
}

#stars {
  position: relative;
  background: transparent;
  width: 200rem;
  height: 200rem;
}

#stars::after {
  content: "";
  position: absolute;
  top: -10rem;
  left: -100rem;
  width: 100%;
  height: 100%;
  animation: animStarRotate 90s linear infinite;
}

#stars::after {
  background-image: radial-gradient(#ffffff 1px, transparent 1%);
  background-size: 50px 50px;
}

#stars::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 170%;
  height: 500%;
  animation: animStar 60s linear infinite;
}

#stars::before {
  background-image: radial-gradient(#ffffff 1px, transparent 1%);
  background-size: 50px 50px;
  opacity: 0.5;
}

@keyframes animStar {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-135rem);
  }
}

@keyframes animStarRotate {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0);
  }
}

@keyframes gradient_301 {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes pulse_3011 {
  0% {
    transform: scale(0.75);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
  }

  100% {
    transform: scale(0.75);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}
</style>